﻿@implements IDisposable

<MudGrid>
	<MudItem md="4">
		<MudButton OnClick="OpenIsFullscreenMode" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Fullscreen" Color="Color.Error">Is Fullscreen Mode</MudButton>
	</MudItem>
	<MudItem md="12" id="fullscreen">
		<MudText Typo="Typo.h6">@Result</MudText>
	</MudItem>
</MudGrid>

@code {

	private bool? Result = null;

	private async Task OpenIsFullscreenMode()
	{
		try
		{
			Result = await Fullscreen.IsFullscreenAsync();
		}
		catch (Exception ex)
		{
			Snackbar.Add($"{DashboardResource.StringError} : {ex.ToString()}", Severity.Error);
		}
	}

	public async void Dispose() => await Dom.DisposeAsync();
}